package com.lwj.vo.system;

import com.lwj.model.system.Menu;

import java.util.ArrayList;
import java.util.List;

public class MenuVo extends Menu {
    private String parentName;
    private List<MenuVo> children;

    public List<MenuVo> getChildren() {
        return children;
    }

    public String getParentName() {
        return parentName;
    }

    public void setParentName(String parentName) {
        this.parentName = parentName;
    }

    public void setChildren(List<MenuVo> children) {
        this.children = children;
    }
    public void addChild(MenuVo menuVo){
        if(this.children==null){
            this.children=new ArrayList<>();
        }
        this.children.add(menuVo);
    }

    public String id(){
        return getMenuId();
    }
    public String parentId(){
        return getParentId();
    }
}
